<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>单笔转账</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="小镖人、社区、网络货运">
    <meta name="description" content="小镖人、社区、网络货运">
    <link rel="stylesheet" href="../../../../xbr_layui_extend/layui-v2.6.8/css/layui.css">
    <style>

        tr td:nth-child(1),
        tr td:nth-child(3) {
            background-color: #E8EAED; /* 设置背景颜色 */
        }
        .layui-layout-admin {
            top: 0;
            left: 0;
            width: 100%;
            height: 50px;
        }

        .layui-layout-admin .layui-footer {
            padding: 10px 0;
            text-align: center;
            left: 0
        }
    </style>
</head>
<body>
<div class="layui-fluid" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="form-initPlat" id="userForm" method="post"
          style="margin-bottom: 80px">
        <div class="layui-form-item" >
        <label class="layui-form-label">查询内容</label>
        <div class="layui-input-inline">
            <input id="queryText" type="text" name="insId"  placeholder="请输入交易单号" autocomplete="off"
                   class="layui-input">
        </div>
        <button id="btnQuery" type="button" class="layui-btn layui-btn-primary layui-border-blue">查询</button>
    </div>
        <table class="layui-table" style="border:1px solid cornsilk">
            <colgroup>
                <col width="100">
                <col width="250">
                <col width="100">
                <col width="250">
            </colgroup>
            <tbody>
            <tr>
                <td>本地流水号</td>
                <td id="tradeNo">无数据</td>
                <td>银行流水号</td>
                <td id="bankFlowNo">无数据</td>
            </tr>
            <tr>
                <td>交易名称</td>
                <td id="transName">无数据</td>
                <td>交易类型</td>
                <td id="tradeType">无数据</td>
            </tr>
            <tr>
                <td>交易状态</td>
                <td id="tradeStatus">无数据</td>
                <td>交易金额</td>
                <td id="money">无数据</td>
            </tr>
            <tr>
                <td>付款人姓名</td>
                <td id="paymentAccountName">无数据</td>
                <td>付款人账号</td>
                <td id="paymentCapitalAccount">无数据</td>
            </tr>
            <tr>
                <td>收款人姓名</td>
                <td id="incomeAccountName">无数据</td>
                <td>收款人账号</td>
                <td id="incomeCapitalAccount">无数据</td>
            </tr>
            <tr>
                <td>备注</td>
                <td id="remark">无数据</td>
                <td>付款操作人</td>
                <td id="optUserName">无数据</td>
            </tr>
            <tr>
                <td>发起时间</td>
                <td id="initiateTime">无数据</td>
                <td>完成时间</td>
                <td id="finishTime">无数据</td>
            </tr>
            </tbody>
        </table>
        <!--提交按钮-->
        <div class="layui-form-item layui-layout-admin" >
            <div class="layui-input-block">
                <div class="layui-footer">
                    <button  class="layui-btn  layui-btn-normal" lay-submit=""  lay-filter="close-initPlat"><i class="layui-icon">&#x1006;</i>关闭
                    </button>
                </div>
            </div>
        </div>
    </form>
</div>


<script src="../../../../xbr_layui_extend/layui-v2.6.8/layui.js"></script>
<script>
    layui.extend({
        admin: '/platform/xbr_layui_extend/admin' //集成路径
    }).use(["admin", 'form'], function () {
        const $ = layui.$, form = layui.form, admin = layui.admin, element = layui.element;
        element.render('icon');
        //上传完毕 提交表单
        form.on('submit(close-initPlat)', function () {
            const index = parent.layer.getFrameIndex(window.name); //获取当前窗口的name
            parent.layer.close(index);//关闭窗口
        });
        $("#btnQuery").click(function(){
            const inputTex = document.getElementById("queryText").value;
            admin.req({
                url: "/platform/cmbc/transferQryXfer",
                data: {insId:inputTex},
                type: 'post',
                done: function (res) {
                    const data = res.data;
                    document.getElementById('tradeNo').innerHTML=data['tradeNo'];
                    document.getElementById('bankFlowNo').innerHTML=data['bankFlowNo'];
                    document.getElementById('transName').innerHTML=data['tradeName'];
                    document.getElementById('tradeType').innerHTML=data['payType'];
                    document.getElementById('tradeStatus').innerHTML=data['status'];
                    document.getElementById('money').innerHTML=data['amount'];
                    document.getElementById('paymentAccountName').innerHTML=data['acntName'];
                    document.getElementById('paymentCapitalAccount').innerHTML=data['acntNo'];
                    document.getElementById('incomeAccountName').innerHTML=data['acntToName'];
                    document.getElementById('incomeCapitalAccount').innerHTML=data['acntToNo'];
                    document.getElementById('optUserName').innerHTML=data['optUserName'];
                    document.getElementById('initiateTime').innerHTML=data['initiateTime'];
                    document.getElementById('finishTime').innerHTML=data['completeTime'];
                    document.getElementById('remark').innerHTML=data['remark'];
                }
            });
        });
    });
</script>
</body>
</html>